<?php

class Setting extends AppModel {
/**
 * Name
 *
 * @var string
 */
 
    public $name = "Setting";


    public static function get_option($name){
        $option = ClassRegistry::init('Setting');
        $option = $option->findByName($name);
        if(!empty($option)){
            return $option['Setting']['value'];
        }
        return '';
    }
    public static function save_option($name,$value){
        $option = ClassRegistry::init('Setting');
        $option = $option->findByName($name);
        if(!empty($option)){
            $opt = new Option();
            $opt->id = $option['Setting']['id'];
            $opt->saveField('value', $value);
        }
    }

    
}